
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>运动控制 · XGO 2中文WIKI</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jd3096">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-image-captions/image-captions.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-expand/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="ai.html" />
    
    
    <link rel="prev" href="key.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">介绍</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    陆吾智能介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../product/readme.html">
            
                <a href="../product/readme.html">
            
                    
                    产品系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../product/XGO-lite2.html">
            
                <a href="../product/XGO-lite2.html">
            
                    
                    XGO-lite2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../product/XGO-mini2.html">
            
                <a href="../product/XGO-mini2.html">
            
                    
                    XGO-mini2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../product/XGO-c.html">
            
                <a href="../product/XGO-c.html">
            
                    
                    XGO竞赛版
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../question/readme.html">
            
                <a href="../question/readme.html">
            
                    
                    常见问题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../question/software.html">
            
                <a href="../question/software.html">
            
                    
                    软件问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../question/hardware.html">
            
                <a href="../question/hardware.html">
            
                    
                    硬件问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">开发前的准备</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../overview/overview.html">
            
                <a href="../overview/overview.html">
            
                    
                    XGO 2产品概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../start/readme.html">
            
                <a href="../start/readme.html">
            
                    
                    XGO 2快速使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="../start/demo.html">
            
                <a href="../start/demo.html">
            
                    
                    示例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="../start/remote.html">
            
                <a href="../start/remote.html">
            
                    
                    遥控模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="../start/blockly.html">
            
                <a href="../start/blockly.html">
            
                    
                    图形化编程模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">开发与使用</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="./">
            
                <a href="./">
            
                    
                    基于python的开发使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="envir.html">
            
                <a href="envir.html">
            
                    
                    环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="connect.html">
            
                <a href="connect.html">
            
                    
                    连接机器狗
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="screen.html">
            
                <a href="screen.html">
            
                    
                    屏幕控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="key.html">
            
                <a href="key.html">
            
                    
                    按键控制
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.1.5" data-path="action.html">
            
                <a href="action.html">
            
                    
                    运动控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="ai.html">
            
                <a href="ai.html">
            
                    
                    AI控制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../uart/">
            
                <a href="../uart/">
            
                    
                    基于串口协议的开发使用
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >运动控制</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><input type="checkbox" class="fa fa-navicon"><ul><li><span class="title-icon "></span><a href="#&#x8FD0;&#x52A8;&#x63A7;&#x5236;"><b>1. </b>&#x8FD0;&#x52A8;&#x63A7;&#x5236;</a></li><ul><li><span class="title-icon "></span><a href="#&#x521D;&#x59CB;&#x5316;"><b>1.1. </b>&#x521D;&#x59CB;&#x5316;</a></li><li><span class="title-icon "></span><a href="#&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;"><b>1.2. </b>&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;</a></li><li><span class="title-icon "></span><a href="#&#x8FD0;&#x52A8;&#x63A7;&#x5236;_1"><b>1.3. </b>&#x8FD0;&#x52A8;&#x63A7;&#x5236;</a></li><ul><li><span class="title-icon "></span><a href="#&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><b>1.3.1. </b>&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon "></span><a href="#&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><b>1.3.2. </b>&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon "></span><a href="#&#x5176;&#x4F59;&#x65B9;&#x6CD5;"><b>1.3.3. </b>&#x5176;&#x4F59;&#x65B9;&#x6CD5;</a></li></ul><li><span class="title-icon "></span><a href="#&#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><b>1.4. </b>&#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</a></li><ul><li><span class="title-icon "></span><a href="#&#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;"><b>1.4.1. </b>&#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;</a></li><li><span class="title-icon "></span><a href="#&#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;"><b>1.4.2. </b>&#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;</a></li><li><span class="title-icon "></span><a href="#&#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;"><b>1.4.3. </b>&#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;</a></li></ul></ul></ul></div><a href="#&#x8FD0;&#x52A8;&#x63A7;&#x5236;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x8FD0;&#x52A8;&#x63A7;&#x5236;"><a name="&#x8FD0;&#x52A8;&#x63A7;&#x5236;" class="anchor-navigation-ex-anchor" href="#&#x8FD0;&#x52A8;&#x63A7;&#x5236;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x8FD0;&#x52A8;&#x63A7;&#x5236;</h1>
<p>XGO2-DOG&#x5185;&#x7F6E;&#x4E86;&#x8FD0;&#x52A8;&#x5E93;&#x6587;&#x4EF6;xgolib.py&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5BFC;&#x5165;&#x4F7F;&#x7528;&#x3002;</p>
<h2 id="&#x521D;&#x59CB;&#x5316;"><a name="&#x521D;&#x59CB;&#x5316;" class="anchor-navigation-ex-anchor" href="#&#x521D;&#x59CB;&#x5316;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x521D;&#x59CB;&#x5316;</h2>
<p>&#x4EE5;&#x4E0B;&#x4E3A;&#x521D;&#x59CB;&#x5316;&#x4EE3;&#x7801;&#xFF1A;</p>
<pre><code class="lang-python">#&#x5BFC;&#x5165;xgolib
from xgolib import XGO  
#&#x5B9E;&#x4F8B;&#x5316;dog
dog = XGO(port=&apos;/dev/ttyAMA0&apos;,version=&quot;xgolite&quot;)
</code></pre>
<h2 id="&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;"><a name="&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;</h2>
<p>&#x7531;&#x4E8E;xgolite&#x4E0E;xgomni&#x5728;&#x8FD0;&#x52A8;&#x6027;&#x80FD;&#x548C;&#x53C2;&#x6570;&#x4E0A;&#x6709;&#x5DEE;&#x5F02;&#xFF0C;&#x4E3A;&#x4E86;&#x51C6;&#x786E;&#x63A7;&#x5236;&#x72D7;&#x7684;&#x8FD0;&#x52A8;&#xFF0C;&#x53EF;&#x901A;&#x8FC7;<code>dog.read_firmware()</code>&#x51FD;&#x6570;&#x68C0;&#x6D4B;&#x673A;&#x5668;&#x72D7;&#x7684;&#x7C7B;&#x578B;&#xFF0C;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#xFF1A;</p>
<pre><code class="lang-python">from xgolib import XGO
dog = XGO(port=&apos;/dev/ttyAMA0&apos;,version=&quot;xgolite&quot;) 
version=dog.read_firmware()
if version[0]==&apos;M&apos;:
    print(&apos;XGO-MINI&apos;)
    dog = XGO(port=&apos;/dev/ttyAMA0&apos;,version=&quot;xgomini&quot;)
    dog_type=&apos;M&apos;
else:
    print(&apos;XGO-LITE&apos;)
    dog_type=&apos;L&apos;
</code></pre>
<p>&#x901A;&#x8FC7;&#x6B64;&#x6BB5;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x5224;&#x65AD;&#x72D7;&#x7684;&#x7C7B;&#x578B;&#xFF0C;&#x82E5;&#x53D8;&#x91CF;dog_type&#x4E3A;&apos;M&apos;&#x5219;&#x72D7;&#x7684;&#x7C7B;&#x578B;&#x4E3A;XGOMINI&#xFF0C;&#x82E5;&#x4E3A;&apos;L&apos;&#x5219;&#x7C7B;&#x578B;&#x4E3A;XGOLITE&#x3002;</p>
<h2 id="&#x8FD0;&#x52A8;&#x63A7;&#x5236;_1"><a name="&#x8FD0;&#x52A8;&#x63A7;&#x5236;_1" class="anchor-navigation-ex-anchor" href="#&#x8FD0;&#x52A8;&#x63A7;&#x5236;_1"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x8FD0;&#x52A8;&#x63A7;&#x5236;</h2>
<h3 id="&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><a name="&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3.1. &#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</h3>
<h4 id="&#x524D;&#x540E;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;"><a name="&#x524D;&#x540E;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;" class="anchor-navigation-ex-anchor" href="#&#x524D;&#x540E;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x524D;&#x540E;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;</h4>
<p><strong>move(direction, step)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">direction</td>
<td style="text-align:center">&#x5B57;&#x7B26;</td>
<td style="text-align:center">&apos;x&apos;&#x3001;&apos;X&apos;&#x3001;&apos;y&apos;&#x3001;&apos;Y&apos;</td>
<td style="text-align:left">&apos;x&apos;&#x6216;&apos;X&apos;&#x4F7F;&#x673A;&#x5668;&#x72D7;&#x524D;&#x8FDB;&#x6216;&#x540E;&#x9000;&#xFF0C;&apos;y&apos;&#x6216;&apos;Y&apos;&#x4F7F;&#x673A;&#x5668;&#x72D7;&#x5DE6;&#x79FB;&#x6216;&#x8005;&#x53F3;&#x79FB;</td>
</tr>
<tr>
<td style="text-align:center">step</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">x:[-25,25],y:[-18,18]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x5E73;&#x79FB;&#x6B65;&#x957F;&#xFF0C;&#x6839;&#x636E;&#x65B9;&#x5411;&#xFF0C;&#x6B63;&#x503C;&#x4EE3;&#x8868;&#x524D;&#x8FDB;&#x6216;&#x5DE6;&#x79FB;&#xFF0C;&#x8D1F;&#x503C;&#x4EE3;&#x8868;&#x540E;&#x9000;&#x6216;&#x53F3;&#x79FB;&#x3002;&#x8F93;&#x5165;&#x503C;&#x8D85;&#x8FC7;&#x8303;&#x56F4;&#x65F6;&#xFF0C;&#x6309;&#x7167;&#x6781;&#x9650;&#x503C;&#x79FB;&#x52A8;&#x3002;</td>
</tr>
</tbody>
</table>
<h4 id="&#x65CB;&#x8F6C;"><a name="&#x65CB;&#x8F6C;" class="anchor-navigation-ex-anchor" href="#&#x65CB;&#x8F6C;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x65CB;&#x8F6C;</h4>
<p><strong>turn(step)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">step</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">[-150,150]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x65CB;&#x8F6C;&#x901F;&#x5EA6;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#xB0;/s&#xFF0C;&#x6B63;&#x503C;&#x4E3A;&#x5DE6;&#x8F6C;&#xFF0C;&#x8D1F;&#x503C;&#x4E3A;&#x53F3;&#x8F6C;&#x3002;</td>
</tr>
</tbody>
</table>
<h4 id="&#x539F;&#x5730;&#x8E0F;&#x6B65;"><a name="&#x539F;&#x5730;&#x8E0F;&#x6B65;" class="anchor-navigation-ex-anchor" href="#&#x539F;&#x5730;&#x8E0F;&#x6B65;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x539F;&#x5730;&#x8E0F;&#x6B65;</h4>
<p><strong>mark_time(data)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">data</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">[10,35]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x539F;&#x5730;&#x8E0F;&#x6B65;&#x62AC;&#x817F;&#x9AD8;&#x5EA6;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;mm&#xFF0C;&#x8F93;&#x5165;&#x4E3A;0&#x65F6;&#x505C;&#x6B62;&#x539F;&#x5730;&#x8E0F;&#x6B65;</td>
</tr>
</tbody>
</table>
<h4 id="&#x6539;&#x53D8;&#x8FC8;&#x6B65;&#x9891;&#x7387;"><a name="&#x6539;&#x53D8;&#x8FC8;&#x6B65;&#x9891;&#x7387;" class="anchor-navigation-ex-anchor" href="#&#x6539;&#x53D8;&#x8FC8;&#x6B65;&#x9891;&#x7387;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6539;&#x53D8;&#x8FC8;&#x6B65;&#x9891;&#x7387;</h4>
<p><strong>pace(mode)</strong> &#x901F;&#x5EA6; = &#x6B65;&#x9891; x &#x6B65;&#x5E45;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">mode</td>
<td style="text-align:center">&#x5B57;&#x7B26;&#x4E32;</td>
<td style="text-align:center">[&apos;normal&apos;,&apos;slow&apos;,&apos;high&apos;]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x8FC8;&#x6B65;&#x9891;&#x7387;&#xFF0C;normal&#x4E3A;&#x9ED8;&#x8BA4;&#x6B65;&#x9891;&#xFF0C;low&#x4E3A;&#x6162;&#x901F;&#x6B65;&#x9891;&#xFF0C;high&#x4E3A;&#x9AD8;&#x901F;&#x6B65;&#x9891;</td>
</tr>
</tbody>
</table>
<h4 id="&#x505C;&#x6B62;&#x79FB;&#x52A8;"><a name="&#x505C;&#x6B62;&#x79FB;&#x52A8;" class="anchor-navigation-ex-anchor" href="#&#x505C;&#x6B62;&#x79FB;&#x52A8;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x505C;&#x6B62;&#x79FB;&#x52A8;</h4>
<p><strong>stop()</strong></p>
<p><strong>&#x79FB;&#x52A8;&#x76F8;&#x5173;&#x65B9;&#x6CD5;&#x793A;&#x4F8B;</strong></p>
<pre><code class="lang-python">#&#x673A;&#x5668;&#x72D7;&#x4EE5;18mm&#x6B65;&#x957F;&#x524D;&#x8FDB;
dog.move(&apos;x&apos;,18)

#&#x673A;&#x5668;&#x72D7;&#x4EE5;5mm&#x6B65;&#x957F;&#x53F3;&#x79FB;
dog.move(&apos;y&apos;,-5)

#&#x4E0B;&#x53E5;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x6B63;&#x5E38;&#x6267;&#x884C;&#xFF0C;&#x4F1A;&#x4EE5;18mm&#x5DE6;&#x79FB;
dog.move(&apos;Y&apos;,30)

#&#x673A;&#x5668;&#x72D7;&#x4EE5;60&#xB0;/s&#x7684;&#x901F;&#x5EA6;&#x5DE6;&#x8F6C;
dog.turn(60)

#&#x673A;&#x5668;&#x72D7;&#x4EE5;&#x9AD8;&#x901F;&#x6B65;&#x9891;&#x8FDB;&#x884C;&#x8FD0;&#x52A8;
dog.pace(&apos;high&apos;)

#&#x673A;&#x5668;&#x72D7;&#x4EE5;25mm&#x7684;&#x62AC;&#x817F;&#x9AD8;&#x5EA6;&#x8FDB;&#x884C;&#x539F;&#x5730;&#x8E0F;&#x6B65;
dog.mark_time(25)

#&#x673A;&#x5668;&#x72D7;&#x505C;&#x6B62;&#x539F;&#x5730;&#x8E0F;&#x6B65;
dog.mark_time(0)

#&#x673A;&#x5668;&#x72D7;&#x505C;&#x6B62;&#x79FB;&#x52A8;
dog.stop()
</code></pre>
<p>&#x5E93;&#x4E2D;&#x57FA;&#x4E8E;&#x8FD9;&#x4E9B;&#x65B9;&#x6CD5;&#x5C01;&#x88C5;&#x4E86;&#x4E00;&#x7CFB;&#x5217;&#x65B9;&#x6CD5;&#x4EE5;&#x4FBF;&#x4E8E;&#x4F7F;&#x7528;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x65B9;&#x6CD5;&#x540D;</th>
<th style="text-align:center">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">move_x(step)</td>
<td style="text-align:center">&#x524D;&#x540E;&#x79FB;&#x52A8;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;x&apos;, step)</td>
</tr>
<tr>
<td style="text-align:center">move_y(step)</td>
<td style="text-align:center">&#x5DE6;&#x53F3;&#x79FB;&#x52A8;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;y&apos;, step)</td>
</tr>
<tr>
<td style="text-align:center">forward(step)</td>
<td style="text-align:center">&#x524D;&#x8FDB;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;x&apos;, abs(step))</td>
</tr>
<tr>
<td style="text-align:center">back(step)</td>
<td style="text-align:center">&#x540E;&#x9000;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;x&apos;, -abs(step))</td>
</tr>
<tr>
<td style="text-align:center">left(step)</td>
<td style="text-align:center">&#x5DE6;&#x79FB;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;y&apos;, abs(step))</td>
</tr>
<tr>
<td style="text-align:center">right(step)</td>
<td style="text-align:center">&#x53F3;&#x79FB;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;move(&apos;y&apos;, -abs(step))</td>
</tr>
<tr>
<td style="text-align:center">turnleft(step)</td>
<td style="text-align:center">&#x5DE6;&#x8F6C;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;turn(abs(step))</td>
</tr>
<tr>
<td style="text-align:center">turnright(step)</td>
<td style="text-align:center">&#x53F3;&#x8F6C;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;turn(-abs(step))</td>
</tr>
</tbody>
</table>
<hr>
<h3 id="&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><a name="&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3.2. &#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</h3>
<p>&#x8C03;&#x8282;&#x4F4D;&#x59FF;&#x65F6;&#xFF0C;&#x673A;&#x5668;&#x72D7;&#x56DB;&#x6761;&#x817F;&#x8DB3;&#x7AEF;&#x4F4D;&#x7F6E;&#x4E0D;&#x53D1;&#x751F;&#x6539;&#x53D8;&#xFF0C;&#x673A;&#x8EAB;&#x7684;&#x4F4D;&#x7F6E;&#x6216;&#x89D2;&#x5EA6;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x3002;</p>
<h4 id="&#x673A;&#x8EAB;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;"><a name="&#x673A;&#x8EAB;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;" class="anchor-navigation-ex-anchor" href="#&#x673A;&#x8EAB;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x673A;&#x8EAB;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;</h4>
<p><strong>translation(direction, data)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">direction</td>
<td style="text-align:center">&#x5355;&#x5B57;&#x7B26;&#x6216;&#x5B57;&#x7B26;&#x5217;&#x8868;</td>
<td style="text-align:center">&apos;x&apos;&#x3001;&apos;y&apos;&#x3001;&apos;z&apos;&#x6216;&#x5305;&#x542B;&#x4EE5;&#x4E0A;&#x503C;&#x7684;&#x5217;&#x8868;</td>
<td style="text-align:left">&apos;x&apos;&#x4EE3;&#x8868;&#x524D;&#x540E;&#x5E73;&#x79FB;&#xFF0C;&apos;y&apos;&#x4EE3;&#x8868;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;&#xFF0C;&apos;z&apos;&#x4EE3;&#x8868;&#x8EAB;&#x9AD8;</td>
</tr>
<tr>
<td style="text-align:center">data</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">x:[-35,35],y:[-18,18],z:[75,115]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x673A;&#x8EAB;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;&#x8DDD;&#x79BB;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;mm</td>
</tr>
</tbody>
</table>
<h4 id="&#x673A;&#x8EAB;&#x59FF;&#x6001;&#x8C03;&#x6574;"><a name="&#x673A;&#x8EAB;&#x59FF;&#x6001;&#x8C03;&#x6574;" class="anchor-navigation-ex-anchor" href="#&#x673A;&#x8EAB;&#x59FF;&#x6001;&#x8C03;&#x6574;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x673A;&#x8EAB;&#x59FF;&#x6001;&#x8C03;&#x6574;</h4>
<p><strong>attitude(direction, data)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">direction</td>
<td style="text-align:center">&#x5355;&#x5B57;&#x7B26;&#x6216;&#x5B57;&#x7B26;&#x5217;&#x8868;</td>
<td style="text-align:center">&apos;r&apos;&#x3001;&apos;p&apos;&#x3001;&apos;y&apos;&#x6216;&#x5305;&#x542B;&#x4EE5;&#x4E0A;&#x503C;&#x7684;&#x5217;&#x8868;</td>
<td style="text-align:left">&apos;r&apos;&#x4EE3;&#x8868;&#x6EDA;&#x8F6C;&#x89D2;&#xFF0C;&apos;p&apos;&#x4EE3;&#x8868;&#x4FEF;&#x4EF0;&#x89D2;&#xFF0C;&apos;y&apos;&#x4EE3;&#x8868;&#x504F;&#x822A;&#x89D2;</td>
</tr>
<tr>
<td style="text-align:center">data</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">r:[-20,20],p:[-15,15],y:[11,11]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x673A;&#x8EAB;&#x59FF;&#x6001;&#x8C03;&#x8282;&#x5E45;&#x5EA6;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#xB0;</td>
</tr>
</tbody>
</table>
<h4 id="&#x673A;&#x8EAB;&#x5468;&#x671F;&#x5E73;&#x79FB;"><a name="&#x673A;&#x8EAB;&#x5468;&#x671F;&#x5E73;&#x79FB;" class="anchor-navigation-ex-anchor" href="#&#x673A;&#x8EAB;&#x5468;&#x671F;&#x5E73;&#x79FB;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x673A;&#x8EAB;&#x5468;&#x671F;&#x5E73;&#x79FB;</h4>
<p><strong>periodic_tran(direction, period)</strong>
&#x673A;&#x5668;&#x72D7;&#x673A;&#x8EAB;&#x5C06;&#x4EE5;&#x6307;&#x5B9A;&#x5468;&#x671F;&#x548C;&#x65B9;&#x5411;&#x8FDB;&#x884C;&#x5F80;&#x590D;&#x5E73;&#x79FB;&#xFF0C;&#x5E45;&#x5EA6;&#x4E3A;&#x4F4D;&#x7F6E;&#x5E73;&#x79FB;&#x6781;&#x9650;&#x503C;&#x7684;&#x4E00;&#x534A;&#xFF0C;&#x53EF;&#x4EE5;&#x540C;&#x65F6;&#x8FDB;&#x884C;&#x591A;&#x4E2A;&#x65B9;&#x5411;&#x7684;&#x5468;&#x671F;&#x8FD0;&#x52A8;&#x3002;&#x673A;&#x8EAB;&#x5468;&#x671F;&#x8FD0;&#x52A8;&#x548C;&#x6574;&#x673A;&#x8FD0;&#x52A8;&#x4E0D;&#x53EF;&#x540C;&#x65F6;&#x8FDB;&#x884C;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">direction</td>
<td style="text-align:center">&#x5355;&#x5B57;&#x7B26;&#x6216;&#x5B57;&#x7B26;&#x5217;&#x8868;</td>
<td style="text-align:center">&apos;x&apos;&#x3001;&apos;y&apos;&#x3001;&apos;z&apos;&#x6216;&#x5305;&#x542B;&#x4EE5;&#x4E0A;&#x503C;&#x7684;&#x5217;&#x8868;</td>
<td style="text-align:left">&apos;x&apos;&#x4EE3;&#x8868;&#x524D;&#x540E;&#x5E73;&#x79FB;&#xFF0C;&apos;y&apos;&#x4EE3;&#x8868;&#x5DE6;&#x53F3;&#x5E73;&#x79FB;&#xFF0C;&apos;z&apos;&#x4EE3;&#x8868;&#x8EAB;&#x9AD8;</td>
</tr>
<tr>
<td style="text-align:center">period</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">[1.5,8]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x8FD0;&#x52A8;&#x5468;&#x671F;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;s;&#x8F93;&#x5165;0&#x65F6;&#x4EE3;&#x8868;&#x505C;&#x6B62;&#x8FD0;&#x52A8;</td>
</tr>
</tbody>
</table>
<h4 id="&#x673A;&#x8EAB;&#x5468;&#x671F;&#x65CB;&#x8F6C;"><a name="&#x673A;&#x8EAB;&#x5468;&#x671F;&#x65CB;&#x8F6C;" class="anchor-navigation-ex-anchor" href="#&#x673A;&#x8EAB;&#x5468;&#x671F;&#x65CB;&#x8F6C;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x673A;&#x8EAB;&#x5468;&#x671F;&#x65CB;&#x8F6C;</h4>
<p><strong>periodic_rot(direction, period)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">direction</td>
<td style="text-align:center">&#x5355;&#x5B57;&#x7B26;&#x6216;&#x5B57;&#x7B26;&#x5217;&#x8868;</td>
<td style="text-align:center">&apos;r&apos;&#x3001;&apos;p&apos;&#x3001;&apos;y&apos;&#x6216;&#x5305;&#x542B;&#x4EE5;&#x4E0A;&#x503C;&#x7684;&#x5217;&#x8868;</td>
<td style="text-align:left">&apos;r&apos;&#x4EE3;&#x8868;&#x6EDA;&#x8F6C;&#x89D2;&#xFF0C;&apos;p&apos;&#x4EE3;&#x8868;&#x4FEF;&#x4EF0;&#x89D2;&#xFF0C;&apos;y&apos;&#x4EE3;&#x8868;&#x504F;&#x822A;&#x89D2;</td>
</tr>
<tr>
<td style="text-align:center">period</td>
<td style="text-align:center">&#x6570;&#x5B57;</td>
<td style="text-align:center">[1.5,8]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x8FD0;&#x52A8;&#x5468;&#x671F;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;s;&#x8F93;&#x5165;0&#x65F6;&#x4EE3;&#x8868;&#x505C;&#x6B62;&#x8FD0;&#x52A8;</td>
</tr>
</tbody>
</table>
<p><strong>&#x4F4D;&#x59FF;&#x76F8;&#x5173;&#x65B9;&#x6CD5;&#x793A;&#x4F8B;</strong></p>
<pre><code class="lang-python">#&#x673A;&#x8EAB;&#x5411;&#x524D;&#x5E73;&#x79FB;18mm
dog.translation(&apos;x&apos;,18)

#&#x673A;&#x8EAB;&#x5411;&#x53F3;&#x5E73;&#x79FB;10mm&#xFF0C;&#x8EAB;&#x9AD8;&#x8BBE;&#x7F6E;&#x4E3A;100mm
#&#x65E2;&#x53EF;&#x4EE5;&#x8F93;&#x5165;&#x5355;&#x4E2A;&#x503C;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x8F93;&#x5165;&#x5217;&#x8868;&#x4EE5;&#x63A7;&#x5236;&#x591A;&#x4E2A;&#x65B9;&#x5411;&#x7684;&#x79FB;&#x52A8;
dog.translation([&apos;y&apos;,&apos;z&apos;],[-10,100])

#&#x673A;&#x8EAB;&#x4FEF;&#x4EF0;&#x89D2;&#x8BBE;&#x7F6E;&#x4E3A;10&#xB0;&#xFF0C;&#x504F;&#x822A;&#x89D2;&#x8BBE;&#x7F6E;&#x4E3A;-4&#xB0;&#xFF0C;&#x6EDA;&#x8F6C;&#x89D2;&#x8BBE;&#x7F6E;&#x4E3A;8&#xB0;
dog.attitude([&apos;p&apos;,&apos;y&apos;,&apos;r&apos;],[10,-4,8])

#&#x673A;&#x8EAB;&#x4EE5;3s&#x7684;&#x5468;&#x671F;&#xFF0C;&#x8FDB;&#x884C;&#x524D;&#x540E;&#x5F80;&#x590D;&#x5E73;&#x79FB;
dog.periodic_tran(&apos;x&apos;,3)

#&#x673A;&#x8EAB;&#x4EE5;3s&#x7684;&#x5468;&#x671F;&#x8FDB;&#x884C;&#x6EDA;&#x8F6C;&#x89D2;&#x5F80;&#x590D;&#x8F6C;&#x52A8;&#xFF0C;&#x4EE5;7.4s&#x5468;&#x671F;&#x8FDB;&#x884C;&#x504F;&#x822A;&#x89D2;&#x5F80;&#x590D;&#x8F6C;&#x52A8;
dog.periodic_rot([&apos;r&apos;,&apos;y&apos;],[3,7.4])

#&#x505C;&#x6B62;&#x504F;&#x822A;&#x89D2;&#x7684;&#x5F80;&#x590D;&#x8F6C;&#x52A8;
dog.periodic_rot(&apos;y&apos;,0)
</code></pre>
<hr>
<h3 id="&#x5176;&#x4F59;&#x65B9;&#x6CD5;"><a name="&#x5176;&#x4F59;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x5176;&#x4F59;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3.3. &#x5176;&#x4F59;&#x65B9;&#x6CD5;</h3>
<h4 id="&#x6062;&#x590D;&#x521D;&#x59CB;&#x72B6;&#x6001;"><a name="&#x6062;&#x590D;&#x521D;&#x59CB;&#x72B6;&#x6001;" class="anchor-navigation-ex-anchor" href="#&#x6062;&#x590D;&#x521D;&#x59CB;&#x72B6;&#x6001;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6062;&#x590D;&#x521D;&#x59CB;&#x72B6;&#x6001;</h4>
<p><strong>reset()</strong>
&#x505C;&#x6B62;&#x6240;&#x6709;&#x8FD0;&#x52A8;&#xFF0C;&#x6240;&#x6709;&#x72B6;&#x6001;&#x5168;&#x90E8;&#x6062;&#x590D;&#x5230;&#x521D;&#x59CB;&#x72B6;&#x6001;</p>
<h4 id="&#x8BBE;&#x7F6E;&#x81EA;&#x7A33;&#x72B6;&#x6001;"><a name="&#x8BBE;&#x7F6E;&#x81EA;&#x7A33;&#x72B6;&#x6001;" class="anchor-navigation-ex-anchor" href="#&#x8BBE;&#x7F6E;&#x81EA;&#x7A33;&#x72B6;&#x6001;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8BBE;&#x7F6E;&#x81EA;&#x7A33;&#x72B6;&#x6001;</h4>
<p><strong>imu(mode)</strong>
&#x81EA;&#x7A33;&#x72B6;&#x6001;&#x4E0B;&#xFF0C;&#x673A;&#x5668;&#x72D7;&#x5C06;&#x81EA;&#x52A8;&#x8C03;&#x8282;&#x59FF;&#x6001;&#x89D2;&#x4EE5;&#x4FDD;&#x6301;&#x80CC;&#x90E8;&#x5904;&#x4E8E;&#x6C34;&#x5E73;&#x4F4D;&#x7F6E;&#xFF0C;&#x4E0D;&#x53EF;&#x5728;&#x5F00;&#x542F;&#x65F6;&#x624B;&#x52A8;&#x8BBE;&#x5B9A;&#x59FF;&#x6001;&#x89D2;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">mode</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">0&#x3001;1</td>
<td style="text-align:left">0&#x4EE3;&#x8868;&#x5173;&#x95ED;&#x3001;1&#x4EE3;&#x8868;&#x5F00;&#x542F;</td>
</tr>
</tbody>
</table>
<p><strong>perform(mode)</strong>
&#x8868;&#x6F14;&#x6A21;&#x5F0F;&#xFF0C;&#x673A;&#x5668;&#x72D7;&#x5C06;&#x5FAA;&#x73AF;&#x6267;&#x884C;&#x9884;&#x8BBE;&#x7684;&#x52A8;&#x4F5C;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">mode</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">0&#x3001;1</td>
<td style="text-align:left">0&#x4EE3;&#x8868;&#x5173;&#x95ED;&#x3001;1&#x4EE3;&#x8868;&#x5F00;&#x542F;</td>
</tr>
</tbody>
</table>
<h4 id="&#x5355;&#x817F;&#x63A7;&#x5236;"><a name="&#x5355;&#x817F;&#x63A7;&#x5236;" class="anchor-navigation-ex-anchor" href="#&#x5355;&#x817F;&#x63A7;&#x5236;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5355;&#x817F;&#x63A7;&#x5236;</h4>
<p><strong>leg(leg_id, data)</strong>
&#x63A7;&#x5236;&#x6307;&#x5B9A;&#x817F;&#x7684;&#x8DB3;&#x7AEF;&#x4F4D;&#x7F6E;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">leg_id</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">1&#x3001;2&#x3001;3&#x3001;4</td>
<td style="text-align:left">&#x5206;&#x522B;&#x4EE3;&#x8868;&#x5DE6;&#x524D;&#x817F;&#x3001;&#x53F3;&#x524D;&#x817F;&#x3001;&#x53F3;&#x540E;&#x817F;&#x3001;&#x5DE6;&#x540E;&#x817F;</td>
</tr>
<tr>
<td style="text-align:center">data</td>
<td style="text-align:center">&#x957F;&#x5EA6;&#x4E3A;3&#x7684;&#x6570;&#x5B57;&#x5217;&#x8868;</td>
<td style="text-align:center">x:[-35,35],y:[-18,18],z:[75,115]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x8DB3;&#x7AEF;&#x4F4D;&#x7F6E;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;mm</td>
</tr>
</tbody>
</table>
<p><strong>&#x5176;&#x4F59;&#x65B9;&#x6CD5;&#x793A;&#x4F8B;</strong></p>
<pre><code class="lang-python">#&#x8BBE;&#x7F6E;&#x53F3;&#x524D;&#x817F;&#x8DB3;&#x7AEF;&#x5750;&#x6807;&#x4E3A;(10mm,-12mm,90mm)
dog.leg(2,[10,-12,90])
</code></pre>
<hr>
<h4 id="&#x8235;&#x673A;&#x63A7;&#x5236;"><a name="&#x8235;&#x673A;&#x63A7;&#x5236;" class="anchor-navigation-ex-anchor" href="#&#x8235;&#x673A;&#x63A7;&#x5236;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8235;&#x673A;&#x63A7;&#x5236;</h4>
<p><strong>motor(motor_id, data)</strong>
&#x63A7;&#x5236;&#x8235;&#x673A;&#x65CB;&#x8F6C;&#x89D2;&#x5EA6;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">motor_id</td>
<td style="text-align:center">&#x6574;&#x6570;&#x6216;&#x6574;&#x6570;&#x5217;&#x8868;</td>
<td style="text-align:center">[11,12,13,21,22,23,31,32,33,41,42,43]</td>
<td style="text-align:left">&#x7B2C;&#x4E00;&#x4F4D;&#x6570;&#x5B57;&#x4EE3;&#x8868;&#x8235;&#x673A;&#x6240;&#x5728;&#x7684;&#x817F;&#xFF0C;&#x7B2C;&#x4E8C;&#x4F4D;&#x6570;&#x5B57;&#x4EE3;&#x8868;&#x5728;&#x8BE5;&#x817F;&#x4E0A;&#x7684;&#x4F4D;&#x7F6E;&#xFF0C;&#x4ECE;&#x4E0B;&#x5230;&#x4E0A;&#x4F9D;&#x6B21;&#x662F;1&#xFF0C;2&#xFF0C;3</td>
</tr>
<tr>
<td style="text-align:center">data</td>
<td style="text-align:center">&#x6570;&#x5B57;&#x6216;&#x6570;&#x5B57;&#x5217;&#x8868;</td>
<td style="text-align:center">&#x4E0B;:[-65, 73],&#x4E2D;:[-66, 93],&#x4E0A;:[-31, 31]</td>
<td style="text-align:left">&#x8BE5;&#x53C2;&#x6570;&#x4EE3;&#x8868;&#x8DB3;&#x7AEF;&#x4F4D;&#x7F6E;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#xB0;</td>
</tr>
</tbody>
</table>
<p><strong>&#x8235;&#x673A;&#x793A;&#x4F8B;</strong></p>
<pre><code>#&#x8BBE;&#x7F6E;&#x53F3;&#x524D;&#x817F;&#x4E2D;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x89D2;&#x5EA6;&#x4E3A;30&#xB0;
dog.motor(22,30)

#&#x8BBE;&#x7F6E;&#x53F3;&#x524D;&#x817F;&#x4E0A;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x89D2;&#x5EA6;&#x4E3A;10&#xB0;&#xFF0C;&#x5DE6;&#x540E;&#x817F;&#x4E0B;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x89D2;&#x5EA6;&#x4E3A;-20&#xB0;
dog.motor([23,41],[10,-20])
</code></pre><h4 id="&#x5355;&#x817F;&#x8235;&#x673A;&#x5378;&#x8F7D;"><a name="&#x5355;&#x817F;&#x8235;&#x673A;&#x5378;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x5355;&#x817F;&#x8235;&#x673A;&#x5378;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5355;&#x817F;&#x8235;&#x673A;&#x5378;&#x8F7D;</h4>
<p><strong>unload_motor(leg_id)</strong>
&#x4F7F;&#x4E00;&#x6761;&#x817F;&#x4E0A;&#x7684;&#x4E09;&#x4E2A;&#x8235;&#x673A;&#x5378;&#x8F7D;&#xFF0C;&#x4E0D;&#x8F93;&#x51FA;&#x529B;&#x77E9;&#xFF0C;&#x4E4B;&#x540E;&#x53EF;&#x4EE5;&#x968F;&#x610F;&#x7528;&#x624B;&#x8F6C;&#x52A8;&#xFF0C;&#x4E00;&#x822C;&#x7528;&#x4E8E;&#x7F16;&#x5199;&#x52A8;&#x4F5C;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">leg_id</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">1,2,3,4</td>
<td style="text-align:left">&#x5206;&#x522B;&#x4EE3;&#x8868;&#x5DE6;&#x524D;&#x817F;&#x3001;&#x53F3;&#x524D;&#x817F;&#x3001;&#x53F3;&#x540E;&#x817F;&#x3001;&#x5DE6;&#x540E;&#x817F;</td>
</tr>
</tbody>
</table>
<h4 id="&#x6240;&#x6709;&#x8235;&#x673A;&#x5378;&#x8F7D;"><a name="&#x6240;&#x6709;&#x8235;&#x673A;&#x5378;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x6240;&#x6709;&#x8235;&#x673A;&#x5378;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6240;&#x6709;&#x8235;&#x673A;&#x5378;&#x8F7D;</h4>
<p><strong>unload_allmotor()</strong>
&#x4F7F;&#x6240;&#x6709;&#x8235;&#x673A;&#x5378;&#x8F7D;&#xFF0C;&#x4E0D;&#x8F93;&#x51FA;&#x529B;&#x77E9;&#xFF0C;&#x53EF;&#x4EE5;&#x968F;&#x610F;&#x7528;&#x624B;&#x8F6C;&#x52A8;</p>
<h4 id="&#x5355;&#x817F;&#x8235;&#x673A;&#x52A0;&#x8F7D;"><a name="&#x5355;&#x817F;&#x8235;&#x673A;&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x5355;&#x817F;&#x8235;&#x673A;&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5355;&#x817F;&#x8235;&#x673A;&#x52A0;&#x8F7D;</h4>
<p><strong>load_motor(leg_id)</strong>
&#x4F7F;&#x4E00;&#x6761;&#x817F;&#x4E0A;&#x7684;&#x4E09;&#x4E2A;&#x8235;&#x673A;<strong>&#x4FDD;&#x6301;&#x5F53;&#x524D;&#x4F4D;&#x7F6E;</strong>&#x52A0;&#x8F7D;&#xFF0C;&#x8F93;&#x51FA;&#x529B;&#x77E9;&#xFF0C;&#x4E4B;&#x540E;&#x4E0D;&#x53EF;&#x4EE5;&#x7528;&#x624B;&#x8F6C;&#x52A8;&#xFF0C;&#x4E00;&#x822C;&#x7528;&#x4E8E;&#x7F16;&#x5199;&#x52A8;&#x4F5C;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">leg_id</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">1,2,3,4</td>
<td style="text-align:left">&#x5206;&#x522B;&#x4EE3;&#x8868;&#x5DE6;&#x524D;&#x817F;&#x3001;&#x53F3;&#x524D;&#x817F;&#x3001;&#x53F3;&#x540E;&#x817F;&#x3001;&#x5DE6;&#x540E;&#x817F;</td>
</tr>
</tbody>
</table>
<h4 id="&#x6240;&#x6709;&#x8235;&#x673A;&#x52A0;&#x8F7D;"><a name="&#x6240;&#x6709;&#x8235;&#x673A;&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x6240;&#x6709;&#x8235;&#x673A;&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6240;&#x6709;&#x8235;&#x673A;&#x52A0;&#x8F7D;</h4>
<p><strong>load_allmotor()</strong>
&#x4F7F;&#x6240;&#x6709;&#x8235;&#x673A;<strong>&#x4FDD;&#x6301;&#x5F53;&#x524D;&#x4F4D;&#x7F6E;</strong>&#x52A0;&#x8F7D;&#xFF0C;&#x8F93;&#x51FA;&#x529B;&#x77E9;&#xFF0C;&#x4E4B;&#x540E;&#x4E0D;&#x53EF;&#x4EE5;&#x7528;&#x624B;&#x8F6C;&#x52A8;</p>
<h4 id="&#x8BBE;&#x7F6E;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x901F;&#x5EA6;"><a name="&#x8BBE;&#x7F6E;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x901F;&#x5EA6;" class="anchor-navigation-ex-anchor" href="#&#x8BBE;&#x7F6E;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x901F;&#x5EA6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8BBE;&#x7F6E;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x901F;&#x5EA6;</h4>
<p><strong>motor_speed(speed)</strong>
&#x8C03;&#x8282;&#x8235;&#x673A;&#x8F6C;&#x52A8;&#x901F;&#x5EA6;&#xFF0C;&#x9002;&#x7528;&#x4E8E;&#x5355;&#x72EC;&#x63A7;&#x5236;&#x8235;&#x673A;&#x7684;&#x60C5;&#x51B5;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">speed</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">[0,255]</td>
<td style="text-align:left">0&#x4E3A;&#x6700;&#x4F4E;&#x901F;&#xFF0C;255&#x4E3A;&#x6700;&#x9AD8;&#x901F;</td>
</tr>
</tbody>
</table>
<h4 id="&#x4FEE;&#x6539;&#x84DD;&#x7259;&#x540D;&#x79F0;"><a name="&#x4FEE;&#x6539;&#x84DD;&#x7259;&#x540D;&#x79F0;" class="anchor-navigation-ex-anchor" href="#&#x4FEE;&#x6539;&#x84DD;&#x7259;&#x540D;&#x79F0;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4FEE;&#x6539;&#x84DD;&#x7259;&#x540D;&#x79F0;</h4>
<p><strong>bt_rename(name)</strong>
&#x91CD;&#x65B0;&#x4FEE;&#x6539;&#x84DD;&#x7259;&#x540D;&#x79F0;&#xFF0C;&#x8C03;&#x7528;&#x8BE5;&#x51FD;&#x6570;&#x540E;&#x84DD;&#x7259;&#x4F1A;&#x65AD;&#x5F00;&#x94FE;&#x63A5;</p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">name</td>
<td style="text-align:center">&#x5B57;&#x7B26;&#x4E32;</td>
<td style="text-align:center">&#x957F;&#x5EA6;&#x4E0D;&#x5927;&#x4E8E;10</td>
<td style="text-align:left">&#x673A;&#x5668;&#x72D7;&#x7684;&#x84DD;&#x7259;&#x540D;&#x79F0;&#x683C;&#x5F0F;&#x4E3A;<strong>XGO_xxx</strong>&#xFF0C;xxx&#x4E3A;&#x53EF;&#x4FEE;&#x6539;&#x90E8;&#x5206;&#xFF0C;&#x4EC5;&#x652F;&#x6301;ascii&#x7801;&#x4E2D;&#x7684;&#x5B57;&#x7B26;&#x3002;</td>
</tr>
</tbody>
</table>
<h4 id="&#x6267;&#x884C;&#x9884;&#x8BBE;&#x52A8;&#x4F5C;"><a name="&#x6267;&#x884C;&#x9884;&#x8BBE;&#x52A8;&#x4F5C;" class="anchor-navigation-ex-anchor" href="#&#x6267;&#x884C;&#x9884;&#x8BBE;&#x52A8;&#x4F5C;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6267;&#x884C;&#x9884;&#x8BBE;&#x52A8;&#x4F5C;</h4>
<p><strong>action(action_id)</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">action_id</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">[1,255]</td>
<td style="text-align:left">ID&#x4E0E;&#x52A8;&#x4F5C;&#x5BF9;&#x5E94;&#x5173;&#x7CFB;&#x89C1;&#x4E0B;&#x8868;</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center">ID</th>
<th style="text-align:center">&#x52A8;&#x4F5C;</th>
<th style="text-align:center">ID</th>
<th style="text-align:center">&#x52A8;&#x4F5C;</th>
<th style="text-align:center">ID</th>
<th style="text-align:center">&#x52A8;&#x4F5C;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">1</td>
<td style="text-align:center">&#x8DB4;&#x4E0B;</td>
<td style="text-align:center">2</td>
<td style="text-align:center">&#x7AD9;&#x8D77;</td>
<td style="text-align:center">3</td>
<td style="text-align:center">&#x530D;&#x5310;&#x524D;&#x8FDB;</td>
</tr>
<tr>
<td style="text-align:center">4</td>
<td style="text-align:center">&#x8F6C;&#x5708;</td>
<td style="text-align:center">5</td>
<td style="text-align:center">&#x539F;&#x5730;&#x8E0F;&#x6B65;</td>
<td style="text-align:center">6</td>
<td style="text-align:center">&#x8E72;&#x8D77;</td>
</tr>
<tr>
<td style="text-align:center">7</td>
<td style="text-align:center">&#x8F6C;&#x52A8;Roll</td>
<td style="text-align:center">8</td>
<td style="text-align:center">&#x8F6C;&#x52A8;Pitch</td>
<td style="text-align:center">9</td>
<td style="text-align:center">&#x8F6C;&#x52A8;Yaw</td>
</tr>
<tr>
<td style="text-align:center">10</td>
<td style="text-align:center">&#x4E09;&#x8F74;&#x8F6C;&#x52A8;</td>
<td style="text-align:center">11</td>
<td style="text-align:center">&#x6492;&#x5C3F;</td>
<td style="text-align:center">12</td>
<td style="text-align:center">&#x5750;&#x4E0B;</td>
</tr>
<tr>
<td style="text-align:center">13</td>
<td style="text-align:center">&#x62DB;&#x624B;</td>
<td style="text-align:center">14</td>
<td style="text-align:center">&#x4F38;&#x61D2;&#x8170;</td>
<td style="text-align:center">15</td>
<td style="text-align:center">&#x6CE2;&#x6D6A;</td>
</tr>
<tr>
<td style="text-align:center">16</td>
<td style="text-align:center">&#x5DE6;&#x53F3;&#x6447;&#x6446;</td>
<td style="text-align:center">17</td>
<td style="text-align:center">&#x6C42;&#x98DF;</td>
<td style="text-align:center">18</td>
<td style="text-align:center">&#x627E;&#x98DF;&#x7269;</td>
</tr>
<tr>
<td style="text-align:center">19</td>
<td style="text-align:center">&#x63E1;&#x624B;</td>
<td style="text-align:center">20</td>
<td style="text-align:center">&#x62DC;&#x5E74;</td>
<td style="text-align:center"></td>
</tr>
</tbody>
</table>
<h4 id="&#x6807;&#x5B9A;&#x8235;&#x673A;&#x4F4D;&#x7F6E;"><a name="&#x6807;&#x5B9A;&#x8235;&#x673A;&#x4F4D;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#&#x6807;&#x5B9A;&#x8235;&#x673A;&#x4F4D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6807;&#x5B9A;&#x8235;&#x673A;&#x4F4D;&#x7F6E;</h4>
<p><strong>calibration(state)</strong>
&#x5982;&#x679C;&#x5F00;&#x673A;&#x540E;&#xFF0C;&#x67D0;&#x4E9B;&#x5173;&#x8282;&#x51FA;&#x73B0;&#x4E86;&#x660E;&#x663E;&#x7684;&#x4F4D;&#x7F6E;&#x504F;&#x5DEE;&#xFF0C;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x8BE5;&#x529F;&#x80FD;&#x8FDB;&#x884C;&#x6807;&#x5B9A;&#x3002;&#x5176;&#x4ED6;&#x60C5;&#x51B5;&#x8BF7;<strong>&#x8C28;&#x614E;&#x4F7F;&#x7528;</strong></p>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:center">&#x683C;&#x5F0F;</th>
<th style="text-align:center">&#x8F93;&#x5165;&#x8303;&#x56F4;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">state</td>
<td style="text-align:center">&#x6574;&#x6570;</td>
<td style="text-align:center">[0,1]</td>
<td style="text-align:left">1 &#x8FDB;&#x5165;&#x6807;&#x5B9A;&#x72B6;&#x6001;&#xFF0C;&#x6B64;&#x65F6;&#x8235;&#x673A;&#x5378;&#x529B;&#xFF0C;&#x7136;&#x540E;&#x5C06;&#x673A;&#x5668;&#x72D7;&#x6446;&#x81F3;&#x6807;&#x5B9A;&#x72B6;&#x6001;&#xFF0C;&#x5C0F;&#x817F;&#x4E0E;&#x5730;&#x9762;&#x5E73;&#x884C;&#xFF0C;&#x5927;&#x817F;&#x4E0E;&#x8EAF;&#x5E72;&#x5448;90&#xB0;&#xFF0C;&#x8EAF;&#x5E72;&#x4E0E;&#x5730;&#x9762;&#x5E73;&#x884C;&#xFF1B;0 &#x5B8C;&#x6210;&#x6807;&#x5B9A;</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="&#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><a name="&#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. &#x8BFB;&#x53D6;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</h2>
<h3 id="&#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;"><a name="&#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;" class="anchor-navigation-ex-anchor" href="#&#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.1. &#x8BFB;&#x53D6;&#x8235;&#x673A;&#x89D2;&#x5EA6;</h3>
<p><strong>read_motor()</strong>
&#x8BFB;&#x53D6;12&#x4E2A;&#x8235;&#x673A;&#x7684;&#x89D2;&#x5EA6;&#xFF0C; &#x8BFB;&#x53D6;&#x6210;&#x529F;&#x5219;&#x8FD4;&#x56DE;&#x957F;&#x5EA6;&#x4E3A;12&#x7684;&#x5217;&#x8868;&#xFF0C;&#x5BF9;&#x5E94;&#x7F16;&#x53F7;[11,12,13,21,22,23,31,32,33,41,42,43]&#x7684;&#x8235;&#x673A;&#x89D2;&#x5EA6;&#xFF0C; &#x8BFB;&#x53D6;&#x5931;&#x8D25;&#x5219;&#x8FD4;&#x56DE;&#x7A7A;&#x5217;&#x8868;</p>
<h3 id="&#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;"><a name="&#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;" class="anchor-navigation-ex-anchor" href="#&#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.2. &#x8BFB;&#x53D6;&#x7535;&#x6C60;&#x7535;&#x91CF;</h3>
<p><strong>read_battery()</strong>
&#x8BFB;&#x53D6;&#x5F53;&#x524D;&#x7535;&#x6C60;&#x7535;&#x91CF;&#xFF0C; &#x8BFB;&#x53D6;&#x6210;&#x529F;&#x5219;&#x8FD4;&#x56DE;1-100&#x7684;&#x6574;&#x6570;&#xFF0C;&#x4EE3;&#x8868;&#x7535;&#x6C60;&#x5269;&#x4F59;&#x7535;&#x91CF;&#x767E;&#x5206;&#x6BD4;&#xFF0C; &#x8BFB;&#x53D6;&#x5931;&#x8D25;&#x5219;&#x8FD4;&#x56DE;0&#x3002;</p>
<h3 id="&#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;"><a name="&#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;" class="anchor-navigation-ex-anchor" href="#&#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.3. &#x8BFB;&#x53D6;&#x59FF;&#x6001;&#x89D2;&#x5EA6;</h3>
<p><strong>read_roll()</strong>
<strong>read_pitch()</strong>
<strong>read_yaw()</strong>
&#x8BFB;&#x53D6;&#x5F53;&#x524D;&#x59FF;&#x6001;&#x89D2;&#x5EA6;&#xFF0C;&#x8BFB;&#x53D6;&#x6210;&#x529F;&#x5219;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;&#x8BFB;&#x53D6;&#x5931;&#x8D25;&#x5219;&#x8FD4;&#x56DE;0</p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9;XGO all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x66F4;&#x65B0;&#x65F6;&#x95F4;&#xFF1A;
2023-03-02 12:07:12
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="key.html" class="navigation navigation-prev " aria-label="Previous page: 按键控制">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="ai.html" class="navigation navigation-next " aria-label="Next page: AI控制">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"运动控制","level":"3.1.5","depth":2,"next":{"title":"AI控制","level":"3.1.6","depth":2,"path":"python/ai.md","ref":"python/ai.md","articles":[]},"previous":{"title":"按键控制","level":"3.1.4","depth":2,"path":"python/key.md","ref":"python/key.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","-lunr","-sharing","-highlight","insert-logo","search-pro","splitter","-copy-code-button","code","advanced-emoji","emphasize","image-captions","anchor-navigation-expand","alerts","flexible-alerts","auto-scroll-table","-popup","tbfed-pagefooter","-page-footer","hide-element","-back-to-top-button","chapter-fold","-expandable-chapters-small","-expandable-chapters"],"root":".","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright ©XGO","modify_label":"更新时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"emphasize":{},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"alerts":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"Attention"},"note":{"className":"info","icon":"fa fa-info-circle","label":"Note"},"style":"callout","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"Tip"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"Warning"},"comment":{"label":"Comment","icon":"fa fa-comments","className":"info"}},"advanced-emoji":{"embedEmojis":false},"anchor-navigation-expand":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"insert-logo":{"style":"background: none; max-height: 80px","url":"logo.png"},"image-captions":{"caption":"Image _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","align":"left","variable_name":"_pictures"}},"theme":"default","author":"jd3096","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":0,"left":0,"top":0,"bottom":0}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"_pictures":[{"backlink":"uart/index.html#fig3.2.1","level":"3.2","align":"left","list_caption":"Figure: XGO-Mini电路板","alt":"XGO-Mini电路板","nro":1,"url":"https://www.xgorobot.com/XgoWiki/wiki/1%20XGO-Mini%20Edu/%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91/%E4%B8%B2%E5%8F%A3%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/board.png","index":1,"caption_template":"Image _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"XGO-Mini电路板","attributes":{},"skip":false,"key":"3.2.1"},{"backlink":"uart/index.html#fig3.2.2","level":"3.2","align":"left","list_caption":"Figure: 机器狗整机坐标系示意图","alt":"机器狗整机坐标系示意图","nro":2,"url":"https://www.xgorobot.com/XgoWiki/wiki/1%20XGO-Mini%20Edu/%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91/%E4%B8%B2%E5%8F%A3%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/XYZ.png","index":2,"caption_template":"Image _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"机器狗整机坐标系示意图","attributes":{},"skip":false,"key":"3.2.2"},{"backlink":"uart/index.html#fig3.2.3","level":"3.2","align":"left","list_caption":"Figure: 机器狗单腿坐标系示意图","alt":"机器狗单腿坐标系示意图","nro":3,"url":"https://www.xgorobot.com/XgoWiki/wiki/1%20XGO-Mini%20Edu/%E4%BA%8C%E6%AC%A1%E5%BC%80%E5%8F%91/%E4%B8%B2%E5%8F%A3%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/coordinate_system_of_leg.png","index":3,"caption_template":"Image _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"机器狗单腿坐标系示意图","attributes":{},"skip":false,"key":"3.2.3"}]},"title":"XGO 2中文WIKI","language":"zh-hans","gitbook":"*","description":"XGO2-DOG-WIKI"},"file":{"path":"python/action.md","mtime":"2023-03-02T04:07:12.262Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-03-02T07:54:27.543Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

